package com.winskysoft.entity;

public class Column {
	
	private String name;
	
	private String column;
	
	private String type;
	
	

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getColumn() {
		return column;
	}

	public void setColumn(String column) {
		this.column = column;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		if(type.indexOf("int")!=-1){
			type="Integer";
		}else if(type.indexOf("varchar")!=-1){
			type="String";
		}else if(type.indexOf("text")!=-1){
			type="String";
		}else if(type.indexOf("datetime")!=-1){
			type="Date";
		}else if(type.indexOf("decimal")!=-1){
			type="Double";
		}else if(type.indexOf("double")!=-1){
			type="Double";
		}else{
			type="String";
		}
		
		this.type = type;
	}
	
	
	public String getMethod(){
		return this.column.substring(0, 1).toUpperCase()+this.column.substring(1);
	}
	
	
}
